/**
 * This is a template for new plugin wrappers
 *
 * TODO:
 * - Add/Change information below
 * - Document usage (importing, executing main functionality)
 * - Remove any imports that you are not using
 * - Add this file to /src/index.ts (follow style of other plugins)
 * - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
 * - Remove this note
 *
 */
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';


export interface ChargeOptions {
  amount?: number;
  amount_refunded?: number;
  amount_settle?: number;
  app?: string;
  body?: string;
  channel?: string;
  client_ip?: string;
  created?: number;
  credential: any;
  currency?: string;
  description: any;
  extra?: any;
  failure_code?: any;
  failure_msg?: any;
  id?: string;
  livemode?: boolean;
  metadata?: any;
  object?: string;
  order_no?: string;
  paid?: boolean;
  refunded?: boolean;
  refunds?: any;
  subject?: string;
  time_expire?: number;
  time_paid?: any;
  time_settle?: any;
  transaction_no?: any;
}
/**
 * @name Pingpp
 * @description
 * This plugin does something
 *
 * @usage
 * ```
 * import { Pingpp } from '@ionic-native/pingpp';
 *
 *
 * constructor(private pingpp: Pingpp) { }
 *
 * ...
 *
 *
 * this.pingpp.functionName('Hello', 123)
 *   .then((res: any) => console.log(res))
 *   .catch((error: any) => console.error(error));
 *
 * ```
 */
@Plugin({
  pluginName: 'Pingpp',
  plugin: 'me.tongchia.cordova.pingpp', // npm package name, example: cordova-plugin-camera
  pluginRef: 'pingpp', // the variable reference to call the plugin, example: navigator.geolocation
  repo: 'https://github.com/TongChia/cordova-plugin-pingpp', // the github repository URL for the plugin
  platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
  install: '', // OPTIONAL install command, in case the plugin requires variables
})
@Injectable()
export class Pingpp extends IonicNativePlugin {

  /**
   * This function does something
   * @param charge {any} Some param to configure something
   * @return {Promise<any>} Returns a promise that resolves when something happens
   */
  @Cordova()
  createPayment(charge: ChargeOptions): Promise<any> {
    return; // We add return; here to avoid any IDE / Compiler errors
  }

}
